package ex01;

import java.util.Scanner;

import static java.lang.Math.sqrt;

public class Program {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        int counter = 1;
        boolean isPrime = true;

        if (num <= 1) {
            System.err.println("IllegalArgument");
            System.exit(-1);
        }
        for (int i = 2; ((i <= sqrt(num)) && isPrime); ++i) {

            if (num % i == 0) {
                isPrime = false;
                break;
            }
            counter++;
        }
        System.out.println(isPrime + " " + counter);

    }
}
